<html>
<body>
<h1>Assigments</h1>
<p>
Clocks may be reset to any non-negative integer value given
by a constant expression, whereas integers may be assigned
using integer expressions. The syntax for assignments is given
by the grammar for <tt>AList</tt>:

<pre>
AList ::= [Assign (',' Assign)*]
Assign ::= IAssign | CAssign

CAssign ::= ID := CExpr
IAssign ::= ID := IExpr
</pre>

<p>The grammar <tt>CAssign</tt> and <tt>IAssign</tt>
are for clocks and integers respectively.

<p><b>Note:</b> the assignments are evaluated sequentially
(not concurrently). On synchronizing transition, the
assignments on the !-side (the sending side) are evaluated
before the ?-side (the receiving side).

<p><b>Note:</b> the <tt>ID</tt>'s in <tt>IExpr</tt> can be
integer variables or constants, but not clocks.

<h2>Examples:</h2>
<ul>
<li><tt>x := 0</tt> - clock (or integer variable) <tt>x</tt> is reset.
<li><tt>j := ( i[1]&gt;i[2] ? i[1] : i[2] )</tt> - integer <tt>j</tt>
  is assigned
  the value of array element <tt>i[1]</tt> if <tt>i[1]</tt> is greater
  than <tt>i[2]</tt>, otherwise the value of <tt>i[2]</tt>.
<li><tt>x := 1, y:=2*x</tt> - integer variable <tt>x</tt> is set to
  <tt>1</tt> and <tt>y</tt>
  to <tt>2</tt> (as assignments are interpreted sequentially).
</ul>

</body>
</html>
